<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::any('/test', 'TestController@dataLists');


Route::group(['namespace' => 'Manage'],function() {

    Route::any('login', 'LoginController@login');
    Route::any('home', 'LoginController@home');
    Route::get('captcha', 'LoginController@captcha');
});
Route::group(['middleware' => 'auth.login','namespace' => 'Manage'],function() {
    /**
     * 首页
     */
    Route::get('/', 'LoginController@index');
    /**
     * 注销
     *
     */
    Route::get('logout', 'LoginController@logout');
    /**
     * 客户管理
     */
    #客户列表
    Route::get('client','ClientController@clientList');
    #客户状态管理
    Route::get('client/clientStatus','ClientController@clientStatus');
    #更改添加人
    Route::get('/client/clientddid_select','ClientController@clientddid_select');
    #客户详细信息
    Route::get('/client/client_detail/{id}','ClientController@client_detail');

    /**
     * 项目管理
     */
    #项目列表
    Route::get('project','ProjectController@projectList');
    #项目状态管理
    Route::get('project/projectStatus','ProjectController@projectStatus');
    #项目图片管理
    Route::get('project/projectPicture/{id}','ProjectController@projectPicture');
    #项目详情页
    Route::get('project/project_detail/{id}','ProjectController@projectDetail');

    /**
     * 线索管理
     */

    #线索列表
    Route::get('clue/list','ClueController@index');
    #线索状态管理
    Route::get('clue/clueStatus','ClueController@clueStatus');
    #线索跟进记录
    Route::get('clue/follow','FollowController@followList');
    #跟进记录启禁用
    Route::get('clue/followStatus','FollowController@followStatus');

    /**
     * 产品管理
     */
    #产品列表
    Route::any('product','ProductController@index');
    Route::get('product/add','ProductController@add');
    Route::post('product/productAdd','ProductController@productAdd');
    Route::get('product/getProduct/{id}','ProductController@getProduct');
    #启用禁用产品
    Route::get('product/setStatus','ProductController@setStatus');
    #获取一级分类对应的二级分类
    Route::get('product/getTwo','ProductController@getTwo');
    #修改产品
    Route::post('product/productUpdate','ProductController@productUpdate');
    #删除产品
    Route::get('product/productDelete','ProductController@productDelete');
    #跳转管理图片页
    Route::get('product/picture/{pid}','ProductController@productPicture');
    #提交产品图片
    Route::post('product/pictureAdd','ProductController@pictureAdd');
    #修改案例图片描述
    Route::post('product/picture/setContent','ProductController@setContent');
    #删除图片
    Route::get('product/deletePicture','ProductController@deletePicture');
    #设置图片使用状态
    Route::get('product/pictureStatus','ProductController@pictureStatus');
    #跳转管理附件页
    Route::get('product/annex/{pid}','ProductController@productAnnex');
    #提交产品附件
    Route::post('product/annexAdd','ProductController@annexAdd');
    #删除附件
    Route::get('product/deleteAnnex','ProductController@deleteAnnex');
    #设置附件使用状态
    Route::get('product/annexStatus','ProductController@annexStatus');


    #分类列表
    Route::get('proCategory','ProductCategoryController@cateList');
    #载入添加页
    Route::get('product/productCategory/add','ProductCategoryController@add');
    #添加分类
    Route::post('product/productCategory/addProductCategory','ProductCategoryController@addProductCategory');
    #删除分类
    Route::get('delCate/{id}','ProductCategoryController@delCate');
    #禁用分类
    Route::get('disabled','ProductCategoryController@disabled');
    #修改分类ID
    Route::get('productCategory/update/{id}/{level}','ProductCategoryController@update');
    #提交修改信息
    Route::post('productCategory/update/updateProductCategory','ProductCategoryController@updateProductCategory');

    /**
     * 案例管理
     */

    #案例列表
    Route::any('caseList','ClientCaseController@index');
    #添加案例
    Route::get('caseAdd','ClientCaseController@caseAdd');
    #读取二级联动数据
    Route::get('case/classes/{id}','ClientCaseController@classes');
    #三级联动-产品
    Route::get('case/three/{cate}','ClientCaseController@three');
    #案例提交
    Route::any('caseCreate','ClientCaseController@create');
    #获取案例ID
    Route::get('caseEdit/{id}','ClientCaseController@edit');
    #获取预览ID
    Route::get('caseShow/{id}','ClientCaseController@caseShow');
    #更新案例
    Route::post('case/update','ClientCaseController@update');
    #启禁用案例
    Route::get('caseStatus','ClientCaseController@caseStatus');
    #图片管理
    Route::get('case/casePicture/{id}','ClientCaseController@casePicture');
    #上传图片页
    Route::get('upload/{num}','ClientCaseController@upload');
    #提交图片
    Route::post('case/picture','ClientCaseController@picture');
    #修改案例图片描述
    Route::post('/case/picture/setContent','ClientCaseController@setContent');
    #修改案例图片权重
    Route::post('/case/picture/setRank','ClientCaseController@setRank');
    #删除图片
    Route::get('case/deletePicture','ClientCaseController@deletePicture');
    #图片启禁用
    Route::get('case/pictureStatus','ClientCaseController@pictureStatus');
    #附件管理
    Route::get('case/caseAnnex/{id}','ClientCaseController@caseAnnex');
    #提交附件
    Route::post('case/annex','ClientCaseController@annex');
    #删除附件
    Route::any('case/deleteAnnex','ClientCaseController@deleteAnnex');
    #附件启禁用
    Route::get('case/annexStatus','ClientCaseController@annexStatus');
    #行业列表
    Route::get('case/industryList','IndustryController@industryList');
    #行业启禁用
    Route::get('case/industryStatus','IndustryController@industryStatus');
    #添加行业
    Route::get('case/industryAdd','IndustryController@industryAdd');
    #行业添加
    Route::post('case/industry','IndustryController@industry');
    #获取行业id
    Route::get('case/industryEdit/{id}','IndustryController@industryEdit');
    #更新行业资料
    Route::post('case/industryUpdate','IndustryController@industryUpdate');
    #删除行业
    Route::get('case/industry/industryDelete','IndustryController@industryDelete');
    #设置案例seo
    Route::get('case/seo/{id}','ClientCaseController@seo');
    Route::post('case/setSeo','ClientCaseController@setSeo');
    /**
     * 订单管理
     */

    #订单列表
    Route::get('order/list','OrderController@orderList');
    #订单状态修改
    Route::get('order/orderStatus','OrderController@orderStatus');
    #订单详情
    Route::get('order/details/{id}','OrderController@order_details');

    /**
     * 需求管理
     */
    #需求列表
    Route::get('demand/demandList','DemandController@demandList');
    #需求启禁用
    Route::get('demand/demandStatus','DemandController@demandStatus');


    /**
     * 系统设置
     */
    #数据字典
    Route::get('system/dateDictionary','DictionaryController@index');

    #管理员列表
    Route::get('system/admin','AdminController@index');
    #设置管理员状态 启用/禁用
    Route::get('system/admin/setStatus','AdminController@setStatus');
    #删除管理员
    Route::get('system/admin/delAdmin','AdminController@delAdmin');
    #增加管理员
    Route::get('system/admin/add','AdminController@add');
    Route::post('system/admin/addAdmin','AdminController@addAdmin');
    #修改管理员
    Route::get('system/admin/update/{id}','AdminController@update');
    Route::post('system/admin/updateAdmin','AdminController@updateAdmin');

    #角色列表
    Route::get('system/role','RoleController@index');
    #设置角色状态 启用/禁用
    Route::get('system/role/setStatus','RoleController@setStatus');
    #删除角色
    Route::get('system/role/delRole','RoleController@delRole');
    #添加角色
    Route::get('system/role/add','RoleController@add');
    Route::post('system/role/addRole','RoleController@addRole');
    Route::get('system/role/getAllUser','RoleController@getAllUser');
    Route::post('system/role/setAdminRole','RoleController@setAdminRole');

    #登陆日志
    Route::get('system/loginLog','LoginLogController@index');
    /**
     * 商机管理
     */

    #商机列表
    Route::get('business/businessList','BusinessController@businessList');
    #商机启禁用
    Route::get('business/businessStatus','BusinessController@businessStatus');

    /**
     * 分享管理
     */

    #分享列表
    Route::get('share','ShareController@shareList');
    #分享启禁用
    Route::get('share/shareStatus','ShareController@shareStatus');
    #详情
    Route::get('share/shareDetails/{id}','ShareController@details');

    #分类管理
    Route::get('share/categoryList','ShareController@categoryList');
    #分类启禁用
    Route::get('share/shareCateStatus','ShareController@shareCateStatus');
    #分类修改
    Route::get('share/categoryEdit/{id}','ShareController@categoryEdit');
    #更新分类
    Route::post('share/categoryUpdate','ShareController@update');

    /**
     * 公告管理
     */

    #公告列表
    Route::get('notice','NoticeController@noticeList');
    #公告启禁用
    Route::get('notice/noticeStatus','NoticeController@noticeStatus');
    #载入添加页面
    Route::get('notice/noticeAdd','NoticeController@noticeAdd');
    #提交公告数据
    Route::post('notice/create','NoticeController@create');
    #获取公告ID
    Route::get('notice/noticeEdit/{id}','NoticeController@noticeEdit');
    #更新公告内容
    Route::post('notice/update','NoticeController@update');
    #删除公告
    Route::get('notice/noticeDelete','NoticeController@noticeDelete');

    /**
     * 管理
     */

    /**
     * 问题反馈
     */
    Route::get('feedback','FeedbackController@index');
    Route::get('feedback/deleteFeedback','FeedbackController@deleteFeedback');

    /**
     * 知识库
     */

    #知识库列表
    Route::get('knowledge','KnowledgeController@knowledgeList');
    #知识库添加页面
    Route::get('knowledge/knowledgeAdd', 'KnowledgeController@knowledgeAdd');
    #添加新知识
    Route::post('knowledge/create','KnowledgeController@knowledgeCreate');
    #载入知识编辑页面
    Route::get('knowledge/knowledgeEdit/{id}', 'KnowledgeController@knowledgeEdit');
    #编辑知识
    Route::post('knowledge/knowledgeUpdate', 'KnowledgeController@knowledgeUpdate');
    #删除知识
    Route::get('knowledge/knowledgeDelete', 'KnowledgeController@knowledgeDelete');
    #知识起禁用
    Route::get('knowledge/knowledgeStatus', 'KnowledgeController@knowledgeStatus');

    /**
     * 知识库分类
     */

    #知识库分类列表
    Route::get('knowledgeCategory','KnowledgeCategoryController@knowledgeCategoryList');
    #知识库分类添加页面
    Route::get('knowledgeCategory/knowledgeCategoryAdd', 'KnowledgeCategoryController@knowledgeCategoryAdd');
    #添加新知识
    Route::post('knowledgeCategory/create','KnowledgeCategoryController@knowledgeCategoryCreate');
    #载入知识分类编辑页面
    Route::get('knowledgeCategory/knowledgeCategoryEdit/{id}', 'KnowledgeCategoryController@knowledgeCategoryEdit');
    #编辑知识分类
    Route::post('knowledgeCategory/knowledgeCategoryUpdate', 'KnowledgeCategoryController@knowledgeCategoryUpdate');
    #删除知识分类
    Route::get('knowledgeCategory/knowledgeCategoryDelete', 'KnowledgeCategoryController@knowledgeCategoryDelete');
    #知识分类起禁用
    Route::get('knowledgeCategory/knowledgeCategoryStatus', 'KnowledgeCategoryController@knowledgeCategoryStatus');

    /**
     * 服务商
     */

    #服务商分类列表
    Route::get('serviceProvider','ServiceProviderController@serviceProviderList');
    #服务商添加页面
    Route::get('serviceProvider/serviceProviderAdd', 'ServiceProviderController@serviceProviderAdd');
    #添加新服务商
    Route::post('serviceProvider/create','ServiceProviderController@serviceProviderCreate');
    #载入服务商编辑页面
    Route::get('serviceProvider/serviceProviderEdit/{id}', 'ServiceProviderController@serviceProviderEdit');
    #编辑服务商
    Route::post('serviceProvider/serviceProviderUpdate', 'ServiceProviderController@serviceProviderUpdate');
    #删除服务商
    Route::get('serviceProvider/serviceProviderDelete', 'ServiceProviderController@serviceProviderDelete');
    #服务商起禁用
    Route::get('serviceProvider/serviceProviderStatus', 'ServiceProviderController@serviceProviderStatus');

    /**
     * 设计师
     */

    #设计师列表
    Route::get('designer','DesignerController@designerList');
    #设计师添加页面
    Route::get('designer/designerAdd', 'DesignerController@designerAdd');
    #添加新设计师
    Route::post('designer/create','DesignerController@designerCreate');
    #载入设计师编辑页面
    Route::get('designer/designerEdit/{id}', 'DesignerController@designerEdit');
    #编辑设计师
    Route::post('designer/designerUpdate', 'DesignerController@designerUpdate');
    #删除设计师
    Route::get('designer/designerDelete', 'DesignerController@designerDelete');
    #设计师起禁用
    Route::get('designer/designerStatus', 'DesignerController@designerStatus');

    /**
     * 统计报表
     */
    #统计登录页
    Route::get('info/loginInfo','InfoController@infoLoginIndex');
    Route::get('info/saleDayInfo','InfoController@saleDayCount');

    /**
     * 员工反馈
     */
    Route::get('member/getTuCaoList', 'MemberController@getMemberTuCaoList');
    Route::post('member/upTuCao', 'MemberController@upMemberTuCao');
    Route::get("member/TuExcel","MemberController@TuExcel");
});

/*
 * 钉钉通讯录共享
 */
Route::group(['namespace' => 'Dingtalk'],function() {

    Route::any('register/url', 'DingtalkController@url');
    //Route::any('suite/receive', 'DingtalkController@receive');

});
